#ifndef SCRIPTVIEWER_H
#define SCRIPTVIEWER_H

#include <QTextBlock>

#include "qtextcursor.h"
#include <QMouseEvent>

#include "qtimer.h"

#include "IF_ScriptViewerInterface.h"

class ScriptActionCreator;
class HighLightTextViewer;

class ScriptViewer : public IF_ScriptViewerInterface
{
   Q_OBJECT
public:
   explicit ScriptViewer( HighLightTextViewer & textViewer, ScriptActionCreator & actionCreator,
                          QObject *parent = 0);

   /* IF_ScriptViewerInterface interface */
public:
   virtual void onActivateNextBlock();
   virtual int getActiveBlockLength() const;
   virtual void getScriptContent(QString &content) const ;
   virtual void setScriptContent(const QString &content);
   virtual void setEditMode(bool);
public slots:
   virtual void addLightEvent();
   virtual void addMediaEvent();
   virtual void setMenuActionList( const QList<QAction *> & actionList);
   virtual void addSearchPath(const QString &);

private:
   HighLightTextViewer & m_textViewer;
   ScriptActionCreator & m_actionHtmlMaker;
};

#endif // SCRIPTVIEWER_H
